package admin

import (
	"news_for_deepseek_interface/controller/admin"
	"news_for_deepseek_interface/service/admin/drafts_config"
	"news_for_deepseek_interface/service/admin/sync_config"

	"github.com/gin-gonic/gin"
)

func NoLogin(router *gin.Engine) {

	adminRouter := router.Group("/admin")
	{
		//登录
		adminRouter.POST("login", admin.Login)

		//刷新token
		adminRouter.POST("refresh_token", admin.RefreshToken)

		//上传文件
		adminRouter.POST("upload", admin.Upload)
	}

	// 定时生成文章
	adminRouter.GET("/drafts/crontab", drafts_config.CrontabCreateNews)

	// 定时同步
	adminRouter.GET("/sync/crontab", sync_config.CrontabSync)

}
